#ifndef GLIMAGE_H
#define GLIMAGE_H

#include <gtkmm.h>
#include <gst/gst.h>
#include <gst/app/app.h>
#include <ImageType.hpp>
#include <thread>

class GLImage
{
  public:
    GLImage();
    virtual ~GLImage();
    Gtk::Widget* GetGtkObject();
    void ShowImage(const ImageType & data);
  private:
    Gtk::Widget* gtkObject;
    GMainLoop* loop;
    GstElement *appsrc,*videoconvert,*glsink,*pipeline;
    std::thread workThread;
};

#endif
